#ifndef _CBETWEENPLOT_H_
#define _CBETWEENPLOT_H_

#include <buola/chart/plots/cxyplot.h>
#include <buola/chart/cseries.h>

namespace buola { namespace chart {

class CBetweenPlot : public CXYPlot
{
public:
    CBetweenPlot();
    virtual ~CBetweenPlot();

public:
/////////////// interface /////////////////

    void SetSeries1(PSeries pSeries);
    void SetSeries2(PSeries pSeries);

    void SetColor(const img::CColor &pColor);
    void SetLineWidth(double pWidth);
    void SetPointDiameter(double pDiameter);

    double GetMinX()    {   return min(mSeries1->mMin.x,mSeries2->mMin.x);  }
    double GetMinPosX() {   return min(mSeries1->mMinPos.x,mSeries2->mMinPos.x);    }
    double GetMaxX()    {   return max(mSeries1->mMax.x,mSeries2->mMax.x);  }
    double GetMinY()    {   return min(mSeries1->mMin.y,mSeries2->mMin.y);  }
    double GetMinPosY() {   return min(mSeries1->mMinPos.y,mSeries2->mMinPos.y);    }
    double GetMaxY()    {   return max(mSeries1->mMax.y,mSeries2->mMax.y);  }

    void Draw(CXYChartContext &pC);

protected:
////////////// internal ///////////////

/////////////////// properties ////////////////////
    PSeries mSeries1;
    PSeries mSeries2;

    double mLineWidth;
    double mPointDiameter;
    img::CColor mColor;
};

/*namespace chart*/ } /*namespace buola*/ }

#endif
